import request from '@/utils/request'

// 获取所有导师-班级绑定
export function getAllTutorClasses() {
  return request({
    url: '/tutor-class/get_all',
    method: 'get'
  })
}

// 按导师ID查询
export function getTutorByTeacherId(teacherId) {
  return request({
    url: `/tutor-class/get-by-teacher-id/${teacherId}`,
    method: 'get'
  })
}

// 新增绑定
export function addTutorClass(teacherId, classId, subId = '18210100') {
  return request({
    url: `/tutor-class/add?teacherId=${teacherId}&classId=${classId}&subId=${subId}`,
    method: 'post'
  })
}

// 删除绑定
export function deleteTutorClass(teacherId, classId) {
  return request({
    url: `/tutor-class/delete/${teacherId}/${classId}`,
    method: 'delete'
  })
}
